package com.iris.live.services.data.models;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created by lusong on 2017/4/6.
 */
public class TVehicleModelMapModelPK implements Serializable {
    private Integer carId;
    private String venderId;

    @Column(name = "car_id")
    @Id
    public Integer getCarId() {
        return carId;
    }

    public void setCarId(Integer carId) {
        this.carId = carId;
    }

    @Column(name = "vender_id")
    @Id
    public String getVenderId() {
        return venderId;
    }

    public void setVenderId(String venderId) {
        this.venderId = venderId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TVehicleModelMapModelPK that = (TVehicleModelMapModelPK) o;

        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;
        if (venderId != null ? !venderId.equals(that.venderId) : that.venderId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = carId != null ? carId.hashCode() : 0;
        result = 31 * result + (venderId != null ? venderId.hashCode() : 0);
        return result;
    }
}
